package com.kaishengit.pojo;


import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name="t_chance")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Chance {
	
	private int id; 
	private String chancename;


	private String des;

	private float money; 
	private String state;
	private String createtime;
	
	private Employee employee;
	private ChanceItem chanceitem ;
	
	private Set<ChanceDiscuss> chanceDiscussSet;
	private Product product;
	
	@Id
	@GeneratedValue
	public int getId() {

		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	
	
	public String getChancename() {
		return chancename;
	}

	public void setChancename(String chancename) {
		this.chancename = chancename;
	}

	

	public String getDes() {
		return des;

	}


	public void setDes(String des) {
		this.des = des;

	}
	public float getMoney() {
		return money;
	}
	public void setMoney(float money) {
		this.money = money;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getCreatetime() {
		return createtime;
	}
	public void setCreatetime(String createtime) {
		this.createtime = createtime;
	}
	@ManyToOne
	@JoinColumn(name="employeeid")
	public Employee getEmployee() {
		return employee;
	}
	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	@ManyToOne
	@JoinColumn(name="chanceitemid")
	public ChanceItem getChanceitem() {
		return chanceitem;
	}
	public void setChanceitem(ChanceItem chanceitem) {
		this.chanceitem = chanceitem;
	}
	@OneToMany(mappedBy="chance")
	public Set<ChanceDiscuss> getChanceDiscussSet() {
		return chanceDiscussSet;
	}
	public void setChanceDiscussSet(Set<ChanceDiscuss> chanceDiscussSet) {
		this.chanceDiscussSet = chanceDiscussSet;
	}
	@ManyToOne
	@JoinColumn(name="productid")
	public Product getProduct() {
		return product;
	}
	public void setProduct(Product product) {
		this.product = product;
	}

	

	
	
}
